package com.xiaobaibai.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author xiaobaibai
 * @since 2020-10-16
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("order_item")
@ApiModel(value="OrderItem对象", description="")
@JsonInclude(value = JsonInclude.Include.NON_NULL)
public class OrderItem implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "订单子项id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "订单总表id")
    @TableField("order_id")
    private String orderId;

    @ApiModelProperty(value = "商品id")
    @TableField("product_id")
    private Integer productId;

    @ApiModelProperty(value = "商品价格")
    @TableField("product_price")
    private BigDecimal productPrice;

    @ApiModelProperty(value = "商品数量")
    @TableField("product_count")
    private Integer productCount;

    @ApiModelProperty(value = "子项总价")
    @TableField("item_price")
    private BigDecimal itemPrice;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;


}
